package com.bawei.module_home.model.service

import com.bawei.library_net.RetrofitManager
import com.bawei.library_net.entity.ResponseEntity
import com.bawei.module_home.model.api.VideoApi
import com.bawei.module_home.model.api.VideoTypeApi
import com.bawei.module_home.model.entity.SimpleTypeEntity
import com.bawei.module_home.model.entity.SimpleVideoEntity
import retrofit2.http.GET
import retrofit2.http.Query

/**
 * @Author : yaotianxue
 * @Time : On 2023/6/25 09:13
 * @Description : VideoTypeService
 */
class VideoService {
    var api:VideoApi
    init {
      api =  RetrofitManager.instance.create(VideoApi::class.java)
    }

    /**
     * 获得推荐视频
     */
    suspend fun getRecommendSimpleVideo(page:Int, pagesize:Int):ResponseEntity<MutableList<SimpleVideoEntity>>{
        return api.getRecommendSimpleVideo(page,pagesize)
    }
    /**
     * 根据chhaanelid获得视频
     */

    suspend fun getSimpleVideoByChannelId( channelId:String, page:Int, pagesize:Int):ResponseEntity<MutableList<SimpleVideoEntity>>{
        return api.getSimpleVideoByChannelId(channelId,page,pagesize)
    }

}